// 路由配置

import {createBrowserRouter} from "react-router-dom";
import Login from "../pages/LoginPage/Login";
import Register from "../pages/RegisterPage/Register";
import AuthLayout from "../components/AuthLayout/AuthLayout";
import Home from "../pages/HomePage/Home";
import User from "../pages/UserPage/User";
import PostVideo from "../pages/PostVideoPage/PostVideo";
import Video from "../pages/VideoPage/Video";

// 配置路由实例
const router = createBrowserRouter([
    {
        path: "/login",
        element: <Login />
    },
    {
        path: "/register",
        element: <Register />
    },
    {
        path: "/",
        element: <AuthLayout />,
        children: [
            {
                path: "/home",
                element: <Home />
            },
            {
                path: "/video",
                element: <Video />
            },
            {
                path: "/user",
                element: <User />
            },
            {
                path: "/postVideo",
                element: <PostVideo />
            }
        ],
    },

]);

export default router;
